BaseSubsystem.AddDirectoryVariable method
Add a directory variable.
Namespace: IntervalZero.KINGSTAR.Base.Class
Assembly: IntervalZero.KINGSTAR.Base.Class (in IntervalZero.KINGSTAR.Base.dll) Version: 4.4.0.0
Syntax
IUserVariable AddDirectoryVariable(
string Name,
IUserVariable Parent = null,
long FolderSize = 0
)
Function AddDirectoryVariable(
Name As String,
Parent = null As IUserVariable,
FolderSize = 0 As Long
) As IUserVariable
Parameters
Name
Type: string
The name of a variable.
Parent
Type: IUserVariable
Default value: null
The parent folder of IUserVariable. By default, it adds variables to the root folder.
FolderSize
Type: long
Default value: 0
The FolderSize is configurable when Parent is not set as null. By default, you can add up to 64 UserVariable.
- When Parent is set as null, the UserVariable will be added to the default directory, which is the root folder. In such case, the space of the root folder can store up to 64 UserVariable and cannot be changed.
- When Parent is not set as null, the UserVariable will be added to the specified directory. In such case, you can configure the FolderSize of the directory.
- FolderSize = 0, the space of the directory will be applied with the default value, which can store up to 64 UserVariable.
- FolderSize ≠ 0, the space of the directory will be applied with the specified value.
Remarks
- The Name string uses UTF-16 encoding.
- You can add up to 64 variables to the root folder.
- The variable can be used in KINGSTAR Scope and a real-time log.
Return value
Type: IUserVariable
Returns a user-defined variable in integer.
Usable EtherCAT states
ecatOffline, ecatInit, ecatBoot, ecatPreOP, ecatSafeOP, ecatOP
See also